//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CTYPE_H__
#define __CTYPE_H__

#include <stddef.h>
#include <wchar.h>

/*
 * The following flags are used to tell iswctype and _isctype what character
 * types you are looking for.
 */
#define _UPPER      0x0001
#define _LOWER      0x0002
#define _DIGIT      0x0004
#define _SPACE      0x0008 /* HT  LF  VT  FF  CR  SP */
#define _PUNCT      0x0010
#define _CONTROL    0x0020
#define _BLANK      0x0040 /* this is SP only, not SP and HT as in C99  */
#define _HEX        0x0080
#define _LEADBYTE   0x8000

#define _ALPHA      0x0103

#ifdef  __cplusplus
extern "C" {
#endif

int __cdecl isalnum(int);
int __cdecl isalpha(int);
int __cdecl iscntrl(int);
int __cdecl isdigit(int);
int __cdecl isgraph(int);
int __cdecl islower(int);
int __cdecl isprint(int);
int __cdecl ispunct(int);
int __cdecl isspace(int);
int __cdecl isupper(int);
int __cdecl isxdigit(int);

int __cdecl tolower(int);
int __cdecl toupper(int);
int __cdecl _tolower(int);
int __cdecl _toupper(int);

int __cdecl _isctype (int, int);

int __cdecl __isascii(int);
int __cdecl __toascii(int);
int __cdecl __iscsymf(int);
int __cdecl __iscsym(int);

int __cdecl iswalnum(wint_t);
int __cdecl iswalpha(wint_t);
int __cdecl iswascii(wint_t);
int __cdecl iswcntrl(wint_t);
int __cdecl iswctype(wint_t, wctype_t);
int __cdecl is_wctype(wint_t, wctype_t);
int __cdecl iswdigit(wint_t);
int __cdecl iswgraph(wint_t);
int __cdecl iswlower(wint_t);
int __cdecl iswprint(wint_t);
int __cdecl iswpunct(wint_t);
int __cdecl iswspace(wint_t);
int __cdecl iswupper(wint_t);
int __cdecl iswxdigit(wint_t);

int __cdecl towlower(wint_t);
int __cdecl towupper(wint_t);
/* wchar_t towlower(wchar_t);*/
/* wchar_t towupper(wchar_t);*/

int __cdecl isleadbyte(int);

//POSIX
int __cdecl isascii(int);
int __cdecl toascii(int);
int __cdecl iscsymf(int);
int __cdecl iscsym(int);

#ifdef  __cplusplus
}
#endif

#endif  // __CTYPE_H__
